{extend name="base" /} 
{block name="css"}
<link rel="stylesheet" href="__CSS__/reply.css"> 
{/block} 
{block name="body"}
<div class="layui-body">
    <!--tab标签-->
    <div class="layui-tab layui-tab-brief">
        <ul class="layui-tab-title">
            <li class="">
                <a href="{:url('admin/subscribereply/index')}">被关注回复</a>
            </li>
            <li class="">
                <a href="{:url('admin/defaultreply/index')}">默认回复</a>
            </li>
            <!-- <li class=""><a href="{:url('admin/subscribereply/poster')}">关注回复推广海报</a></li> -->
            <li class="layui-this">关键词回复</li>
        </ul>
        <div class="layui-tab-content">
            <div class="title">关键词回复</div>
            <div class="reply-list">
                <div class="content">
                    <div class="auto-reply">自动回复</div>
                    <div class="tips">通过编辑内容或关键词规则，快速进行自动回复设置。如具备开发能力，可更灵活地使用该功能。<br />关闭自动回复之后，将立即对所有用户生效。</div>
                    <div class="add">
                        <div><a href="">搜索</a></div>
                        <div><a href="{:url('admin/kw_reply/add')}">添加回复</a></div>
                    </div>
                    <div class="layui-tab-item layui-show">
                            <table class="layui-table">
                                <thead>
                                <tr style="height: 55px;">
                                    <th>规则名称</th>
                                    <th>关键词</th>
                                    <th>回复内容</th>
                                    <th style="text-align: right;">操作</th>
                                </tr>
                                </thead>
                                <tbody>
                                {foreach name="kw_reply_list" item="v"}
                                <tr style="height: 55px;">
                                    <td>{$v.name}</td>
                                    <td>{foreach name="$v.keyword_list_info" item="keyword"}{$keyword.content}&nbsp;&nbsp;{/foreach}</td>
                                    {php}$t = 0;{/php}
                                    {foreach name="$v.reply_list_info" item="type_count"}
                                            {eq name="$type_count.type" value="text"}
                                                {php}++$t;{/php}
                                            {/eq}
                                    {/foreach}
                                    <td>{php}echo $t.'文本';{/php}&nbsp;&nbsp;</td>
                                    <td style="text-align: right;">
                                        <a href="" style="color: #576B95 !important">详情</a>
                                        <a href="{:url('admin/kw_reply/edit',['id' => $v.id])}" style="color: #576B95 !important">编辑</a>
                                        <a href="{:url('admin/kw_reply/delete',['id' => $v.id])}" style="color: #576B95 !important">删除</a>
                                    </td>
                                </tr>
                                {/foreach}
                                </tbody>
                            </table>
                            <!--分页-->
                        </div>
                </div>
            </div>
        </div>
    </div>
</div>
{/block}